gusucode.com > 耐品图片管理系统 标准版A > 耐品图片管理系统 标准版A/CodePut.asp
<!--#Include File="Head.asp"--> <% '=============================================================== ' 著作权号:中国国家版权局著作权登记号2004SR07385 ' 版权所有:深圳市耐品科技开发有限公司 www.naipin.com ' 联系电话:0755-26611119 81234844 81234845 ' 联系手机:13316911914 ' 联系邮箱:naipin@naipin.com '=============================================================== '//*****************************************************************************// ''@ 耐品网站管理系统首页调用 ''@ 适用版本:V 200605 ''@ 官方网址:http://www.naipin.com ''@ 程序作者:Lyout ''@ 更新日期:2006-05-08 '//*****************************************************************************// Dim Temp_CodeTemplates '//*****************************************************************************// ''@ 设置外部调用限制 Const LockUrl = "" ''@ 说明:只允许调用网址,要以"HTTP://"开头,为空则不限制所有外部调用.(可允许多网址限制,要以","分隔。) ''@ 使用:例如只允许此两个网址调用: lockurl="http://www.netpic.net/,http://www.naipin.com/" '//*****************************************************************************// '//*****************************************************************************// ''@ 设置临时文件名 Temp_CodeTemplates = "Templates/Temp_CodeTemplates.config" '临时文件名可自行修改。该文件可以随时删除清理。 '//*****************************************************************************// If CheckServer(Lockurl)=False then OutPut "数据被保护,禁止被其他站点调用!" Response.End End If Dim NewsConfigFile,SQL Dim XmlDoc,Node,NewsMainStr NewsConfigFile = "Templates/CodeTemplates.config" Call LoadXml() Call Page_Main() Call CloseFile() Sub LoadXml() NewsConfigFile = Server.MapPath(NewsConfigFile) Temp_CodeTemplates = Server.MapPath(Temp_CodeTemplates) Set XmlDoc = Server.CreateObject("MSXML.DOMDocument") XmlDoc.Async = False If Not XmlDoc.load(NewsConfigFile) Then XmlDoc.loadxml "<?xml version=""1.0"" encoding=""gb2312""?><NewscodeInfo/>" End If End Sub 'Response.Write "<br>页面执行时间 "&FormatNumber((Timer()-Startime)*1000,5)&" 毫秒" Sub Page_Main() Dim GetName GetName = Lcase(Request.QueryString("Name")) If GetName = "" Then OutPut "参数错误,调用已中止!" Exit Sub End If Set Node = XmlDoc.DocumentElement.selectSingleNode("NewsCode[@NewsName='"&GetName&"']") If (Node is nothing) Then OutPut "设置数据不存在,调用已中止!" Exit Sub End If Dim UpdateTime,LastTime UpdateTime = Netout.CheckNumeric(Node.getAttribute("UpdateTime")) LastTime = Node.getAttribute("LastTime") If UpdateTime>0 and IsDate(LastTime) Then If Datediff("s",LastTime,now()) > UpdateTime Then '更新 Call UpNewsData() Call SaveData() Else Call LoadNewsData() End If Else Call UpNewsData() End If Call ShowData() End Sub Sub CloseFile() Set XmlDoc = Nothing End Sub Sub ShowData() If NewsMainStr <>"" Then OutPut NewsMainStr End If End Sub Sub SaveData() If NewsMainStr = "" Then Exit Sub Node.Attributes.getNamedItem("LastTime").Text = Now() XmlDoc.save NewsConfigFile Dim TempXmlDoc,TempXml_Nodes,attributes,ChildNode,createCDATASection Set TempXmlDoc = Server.CreateObject("MSXML.DOMDocument") TempXmlDoc.Async = False If Not TempXmlDoc.load(Temp_CodeTemplates) Then TempXmlDoc.loadxml "<?xml version=""1.0"" encoding=""gb2312""?><TempNewsData/>" End If Set TempXml_Nodes = TempXmlDoc.DocumentElement.selectSingleNode("NewsData[@NewsName='"&Node.getAttribute("NewsName")&"']") If Not (TempXml_Nodes is nothing) Then TempXmlDoc.DocumentElement.RemoveChild(TempXml_Nodes) End If '创建调用数据 Set TempXml_Nodes = XmlDoc.createNode(1,"NewsData","") Set attributes = TempXmlDoc.createAttribute("NewsName") attributes.text = Node.getAttribute("NewsName") TempXml_Nodes.attributes.setNamedItem(attributes) Set ChildNode = TempXmlDoc.createNode(1,"Temp_Data","") Set createCDATASection=TempXmlDoc.createCDATASection(NewsMainStr) ChildNode.appendChild(createCDATASection) TempXml_Nodes.appendChild(ChildNode) TempXmlDoc.documentElement.appendChild(TempXml_Nodes) TempXmlDoc.save Temp_CodeTemplates Set TempXmlDoc = Nothing End Sub Sub LoadNewsData() Dim TempXmlDoc,TempXml_Nodes Set TempXmlDoc = Server.CreateObject("MSXML.DOMDocument") TempXmlDoc.Async = False If Not TempXmlDoc.load(Temp_CodeTemplates) Then Call UpNewsData() Call SaveData() Exit Sub End If Set TempXml_Nodes = TempXmlDoc.DocumentElement.selectSingleNode("NewsData[@NewsName='"&Node.getAttribute("NewsName")&"']") If Not (TempXml_Nodes is nothing) Then NewsMainStr = TempXml_Nodes.selectSingleNode("Temp_Data").text Else Call UpNewsData() Call SaveData() End If Set TempXmlDoc = Nothing End Sub Sub OutPut(Strings) Response.Write "document.write('"&Strings&"');"&vbNewline End Sub Sub UpNewsData() Dim NewsType,Rs NewsType = Node.getAttribute("NewsType") If InStr(",1,2,3,4,5,6,7,11,",","&NewsType&",") Then Set Rs = Conn.Execute(Node.selectSingleNode("Search").text) If Not Rs.Eof Then SQL = Rs.GetRows(-1) Else OutPut Node.getAttribute("EmptyText") Exit Sub End If Rs.close Set Rs = Nothing End If Select Case NewsType Case "1" : Call NewsType_1() '文章调用 Case "2" : Call NewsType_2() '图片调用 Case "3" : Call NewsType_3() '公告调用 Case "4" : Call NewsType_4() '专题调用 Case "5" : Call NewsType_5() '分类调用 Case "6" : Call NewsType_6() '友情连接调用 Case "7" : Call NewsType_7() '首页大图调用 Case "8" : Call NewsType_8() '登录调用 Case "9","10" : Call NewsType_910() '广告调用 Case "11" : Call NewsType_11() '顶部连接调用 Case Else OutPut "调用类型不存在,调用已中止!" Exit Sub End Select NewsMainStr = Fixjs(NewsMainStr) End Sub Sub NewsType_1() Dim Skin_Main Dim Rs,i,j Dim Topic,TopicLen,ClassID,SpecialID Dim ClassName,ClassInfo,SpecialName TopicLen = Node.getAttribute("TopicLen") If Not Isnumeric(TopicLen) or TopicLen = "" Then TopicLen = 20 Else TopicLen = Cint(TopicLen) End If Dim Board_Input(4,2) Board_Input(0,0) = 20 Board_Input(1,0) = 100 Board_Input(2,0) = 20 For i = 0 To 2 Board_Input(i,1) = Node.selectSingleNode("Board_Input"&i).text Board_Input(i,1) = Netout.CheckNumeric(Board_Input(i,1)) If Board_Input(i,1) = 0 Then Board_Input(i,1) = Board_Input(i,0) Next Board_Input(3,1) = Node.selectSingleNode("Board_Input3").text Dim Columns Columns = Netout.CheckNumeric(Node.getAttribute("Columns")) If Columns = 0 Then Columns = 1 Set Rs = Server.CreateObject("Adodb.RecordSet") For i=0 To Ubound(SQL,2) Step Columns For j = 0 To Columns - 1 If i+j>Ubound(SQL,2) Then Exit For Skin_Main = Node.selectSingleNode("Skin_Main").text ClassName = "" ClassInfo = "" SpecialName = "" Topic = SQL(3,i+j) If Netout.strLength(Topic)>TopicLen then Topic = Netout.CutStr(Topic,TopicLen)&"..." End if ClassID = SQL(1,i+j) Rs.Open "Select ClassName,ClassIntro From Nt_ArtClassName Where ID="&ClassID,Conn,1,1 If Not Rs.Eof Then ClassName = Rs(0):ClassInfo = Rs(1) End If Rs.Close If Netout.strLength(ClassName)>Board_Input(0,1) Then ClassName = Netout.CutStr(ClassName,Board_Input(0,1))&"..." End If If Netout.strLength(ClassInfo)>Board_Input(1,1) Then ClassInfo = Netout.CutStr(ClassInfo,Board_Input(1,1))&"..." End If SpecialID = SQL(2,i+j) Rs.Open "Select SpecialName From Nt_ArtSpecial Where ID="&SpecialID,Conn,1,1 If Not Rs.Eof Then SpecialName = Rs(0) End If Rs.Close If Netout.strLength(SpecialName)>Board_Input(2,1) Then SpecialName = Netout.CutStr(SpecialName,Board_Input(2,1))&"..." End If Skin_Main = Replace(Skin_Main,"{?ID}",SQL(0,i+j)) Skin_Main = Replace(Skin_Main,"{?Title}",Topic) Skin_Main = Replace(Skin_Main,"{?UserName}",SQL(6,i+j)) Skin_Main = Replace(Skin_Main,"{?AddTime}",Netout.FormatTime(SQL(7,i+j),Node.getAttribute("FormatTime"))) Skin_Main = Replace(Skin_Main,"{?ClassName}",ClassName) Skin_Main = Replace(Skin_Main,"{?ClassInfo}",ClassInfo) Skin_Main = Replace(Skin_Main,"{?SpecialName}",SpecialName) Skin_Main = Replace(Skin_Main,"{?ClassID}",ClassID) Skin_Main = Replace(Skin_Main,"{?SpecialID}",SpecialID) Skin_Main = Replace(Skin_Main,"{?StyleID}",Netout.CssFilePath) NewsMainStr = NewsMainStr & Skin_Main Next NewsMainStr = NewsMainStr & Board_Input(3,1) Next Set Rs = Nothing NewsMainStr = Node.selectSingleNode("Skin_Head").text & NewsMainStr & Node.selectSingleNode("Skin_Footer").text End Sub Sub NewsType_2() Dim Skin_Main,ImageType Dim Rs,i,j ImageType = Node.getAttribute("ImageType") Dim Board_Input(6,2) Board_Input(0,0) = 20 Board_Input(1,0) = 100 Board_Input(2,0) = 20 Board_Input(3,0) = 100 Board_Input(4,0) = 20 For i = 0 To 4 Board_Input(i,1) = Node.selectSingleNode("Board_Input"&i).text Board_Input(i,1) = Netout.CheckNumeric(Board_Input(i,1)) If Board_Input(i,1) = 0 Then Board_Input(i,1) = Board_Input(i,0) Next Board_Input(5,1) = Node.selectSingleNode("Board_Input5").text Dim PicWidth,PicHeight,ImageSize,ImageCode,Columns Dim ImageID,TitleID,ClassID,SpecialID,Thumbnail,RootPath Dim TitleName,TitleInfo,ClassName,ClassInfo,SpecialName PicWidth = Netout.CheckNumeric(Node.getAttribute("PicWidth")) PicHeight = Netout.CheckNumeric(Node.getAttribute("PicHeight")) Thumbnail = Node.getAttribute("Thumbnail") If PicWidth = 0 Then PicWidth = CInt(Config.Settings(5)) If PicHeight = 0 Then PicHeight = CInt(Config.Settings(6)) If Config.WaterMark(0) = "1" Then If PicWidth>CInt(Config.Settings(5)) Or PicHeight>CInt(Config.Settings(6)) Then If Config.Settings(18) = "1" Then RootPath = Config.SystemUrl&"Show.asp?s=i&f=" Else RootPath = Config.SystemUrl&Config.ImagePath(1) End If Else RootPath = Config.SystemUrl&Config.ImagePath(2) End If Else If Config.Settings(18) = "1" Then RootPath = Config.SystemUrl&"Show.asp?s=s&f=" Else RootPath = Config.SystemUrl&Config.ImagePath(0) End If End If Dim ThumbnailSize If Thumbnail = "1" Then ImageSize = " width="&PicWidth&" height="&PicHeight End If Columns = Netout.CheckNumeric(Node.getAttribute("Columns")) If Columns = 0 Then Columns = 1 Set iRs = Server.CreateObject("adodb.recordset") Set Rs = Server.CreateObject("Adodb.RecordSet") For i=0 To Ubound(SQL,2) Step Columns For j = 0 To Columns - 1 If i+j>Ubound(SQL,2) Then Exit For Skin_Main = Node.selectSingleNode("Skin_Main").text ClassName = "" ClassInfo = "" SpecialName = "" TitleName = SQL(3,i+j) If Netout.strLength(TitleName)>Board_Input(0,1) then TitleName = Netout.CutStr(TitleName,Board_Input(0,1))&"..." End if TitleInfo = SQL(4,i+j) If Netout.strLength(TitleInfo)>Board_Input(1,1) then TitleInfo = Netout.CutStr(TitleInfo,Board_Input(1,1))&"..." End if ClassID = SQL(1,i+j) Rs.Open "Select ClassName,ClassIntro From Nt_ClassName Where ID="&ClassID,Conn,1,1 If Not Rs.Eof Then ClassName = Rs(0):ClassInfo = Rs(1) End If Rs.Close If Netout.strLength(ClassName)>Board_Input(2,1) Then ClassName = Netout.CutStr(ClassName,Board_Input(2,1))&"..." End If If Netout.strLength(ClassInfo)>Board_Input(3,1) Then ClassInfo = Netout.CutStr(ClassInfo,Board_Input(3,1))&"..." End If SpecialID = SQL(2,i+j) Rs.Open "Select SpecialName From Nt_ArtSpecial Where ID="&SpecialID,Conn,1,1 If Not Rs.Eof Then SpecialName = Rs(0) End If Rs.Close If Netout.strLength(SpecialName)>Board_Input(4,1) Then SpecialName = Netout.CutStr(SpecialName,Board_Input(4,1))&"..." End If Skin_Main = Replace(Skin_Main,"{?TitleID}",SQL(0,i+j)) Skin_Main = Replace(Skin_Main,"{?TitleName}",TitleName) Skin_Main = Replace(Skin_Main,"{?TitleInfo}",TitleInfo) Skin_Main = Replace(Skin_Main,"{?ClassID}",ClassID) Skin_Main = Replace(Skin_Main,"{?ClassName}",ClassName) Skin_Main = Replace(Skin_Main,"{?ClassInfo}",ClassInfo) Skin_Main = Replace(Skin_Main,"{?SpecialID}",SpecialID) Skin_Main = Replace(Skin_Main,"{?SpecialName}",SpecialName) Skin_Main = Replace(Skin_Main,"{?UserName}",SQL(5,i+j)) Skin_Main = Replace(Skin_Main,"{?ManuName}",SQL(6,i+j)) Skin_Main = Replace(Skin_Main,"{?AddTime}",Netout.FormatTime(SQL(9,i+j),Node.getAttribute("FormatTime"))) Skin_Main = Replace(Skin_Main,"{?UpdateTime}",Netout.FormatTime(SQL(10,i+j),Node.getAttribute("FormatTime"))) If ImageType = "0" Then Skin_Main = Replace(Skin_Main,"{?Click}",SQL(7,i+j)) Skin_Main = Replace(Skin_Main,"{?ImageCount}",SQL(8,i+j)) iRs.Open "Select Top 1 [ID],ImageFile,ImageSize,ImageType from Nt_ImgBook Where TitleID="&SQL(0,i+j)&" and Passed=1 and IsHide=0 Order By [ID] Desc",Conn,1,1 If Thumbnail = "0" Then ThumbnailSize = Split(iRs("Imagesize")&",",",") ImageSize = Netout.TrueSize(ThumbnailSize(0),ThumbnailSize(1),PicWidth,PicHeight) End If ImageCode = "<IMG border=0 vspace=2 hspace=2 SRC="""&RootPath&iRs(1)&""" style=""border: 1 solid #000000"""&ImageSize&">" Skin_Main = Replace(Skin_Main,"{?ImageType}",iRs(2)) Skin_Main = Replace(Skin_Main,"{?ImageID}",iRs(0)) iRs.Close Else If Thumbnail = "0" Then ThumbnailSize = Split(SQL(14,i+j)&",",",") ImageSize = Netout.TrueSize(ThumbnailSize(0),ThumbnailSize(1),PicWidth,PicHeight) End If Skin_Main = Replace(Skin_Main,"{?ImageType}",SQL(11,i+j)) ImageCode = "<IMG border=0 vspace=2 hspace=2 SRC="""&RootPath&SQL(13,i+j)&""" style=""border: 1 solid #000000"""&ImageSize&">" Skin_Main = Replace(Skin_Main,"{?ImageID}",SQL(12,i+j)) End If Skin_Main = Replace(Skin_Main,"{?ImageCode}",ImageCode) Skin_Main = Replace(Skin_Main,"{?StyleID}",Netout.CssFilePath) NewsMainStr = NewsMainStr & Skin_Main Next NewsMainStr = NewsMainStr & Board_Input(5,1) Next Set Rs = Nothing Set iRs = Nothing NewsMainStr = Node.selectSingleNode("Skin_Head").text & NewsMainStr & Node.selectSingleNode("Skin_Footer").text End Sub Sub NewsType_3() Dim Skin_Main Dim Rs,i,j Dim Topic,TopicLen TopicLen = Node.getAttribute("TopicLen") If Not Isnumeric(TopicLen) or TopicLen = "" Then TopicLen = 20 Else TopicLen = Cint(TopicLen) End If Dim Board_Input Board_Input = Node.selectSingleNode("Board_Input0").text Dim Columns Columns = Netout.CheckNumeric(Node.getAttribute("Columns")) If Columns = 0 Then Columns = 1 For i=0 To Ubound(SQL,2) Step Columns For j = 0 To Columns - 1 If i+j>Ubound(SQL,2) Then Exit For Skin_Main = Node.selectSingleNode("Skin_Main").text Topic = SQL(1,i+j) If Netout.strLength(Topic)>TopicLen then Topic = Netout.CutStr(Topic,TopicLen)&"..." End if Skin_Main = Replace(Skin_Main,"{?ID}",SQL(0,i+j)) Skin_Main = Replace(Skin_Main,"{?Title}",Topic) Skin_Main = Replace(Skin_Main,"{?AddTime}",Netout.FormatTime(SQL(2,i+j),Node.getAttribute("FormatTime"))) Skin_Main = Replace(Skin_Main,"{?StyleID}",Netout.CssFilePath) NewsMainStr = NewsMainStr & Skin_Main Next NewsMainStr = NewsMainStr & Board_Input Next Set Rs = Nothing NewsMainStr = Node.selectSingleNode("Skin_Head").text & NewsMainStr & Node.selectSingleNode("Skin_Footer").text End Sub Sub NewsType_4() Dim Skin_Main Dim Rs,i,j Dim SpecialName,TopicLen,Board_Input,Columns,ShowType TopicLen = Netout.CheckNumeric(Node.getAttribute("TopicLen")) If TopicLen = 0 Then TopicLen = 20 ShowType = Node.getAttribute("ShowType") If ShowType = "0" Then Columns = 1 Else Board_Input = Node.selectSingleNode("Board_Input0").text Columns = Netout.CheckNumeric(Node.getAttribute("Columns")) If Columns = 0 Then Columns = 1 End If For i=0 To Ubound(SQL,2) Step Columns For j = 0 To Columns - 1 If i+j>Ubound(SQL,2) Then Exit For Skin_Main = Node.selectSingleNode("Skin_Main").text SpecialName = SQL(1,i+j) If ShowType = "1" Then If Netout.strLength(SpecialName)>TopicLen then SpecialName = Netout.CutStr(SpecialName,TopicLen)&"..." End if End If Skin_Main = Replace(Skin_Main,"{?ClassID}",SQL(0,i+j)) Skin_Main = Replace(Skin_Main,"{?SpecialName}",SpecialName) Skin_Main = Replace(Skin_Main,"{?StyleID}",Netout.CssFilePath) NewsMainStr = NewsMainStr & Skin_Main Next NewsMainStr = NewsMainStr & Board_Input Next Set Rs = Nothing NewsMainStr = Node.selectSingleNode("Skin_Head").text & NewsMainStr & Node.selectSingleNode("Skin_Footer").text End Sub Sub NewsType_5() Dim Skin_Main Dim Rs,i,j Dim ShowType ShowType = Node.getAttribute("ShowType") If ShowType = "0" Then Dim Line(20),strLine,Depth For i=0 To 20 Line(i) = False Next For i = 0 To Ubound(SQL,2) Skin_Main = Node.selectSingleNode("Skin_Main").text Depth = SQL(3,i) IF CLng(SQL(4,i))>0 Then Line(Depth)=True Else Line(Depth)=False End If strLine = "" IF Depth>0 Then For j=1 To Depth strLine = strLine & " " If j=Depth Then If CLng(SQL(4,i))>0 Then strLine = strLine & "├ " Else strLine = strLine & "└ " Else If Line(j)=True Then strLine = strLine & "│" Else strLine = strLine & " " End If Next End If Skin_Main = Replace(Skin_Main,"{?ClassID}",SQL(0,i)) Skin_Main = Replace(Skin_Main,"{?ClassName}",strLine&SQL(2,i)) Skin_Main = Replace(Skin_Main,"{?ParentID}",SQL(1,i)) Skin_Main = Replace(Skin_Main,"{?target}",SQL(5,i)) Skin_Main = Replace(Skin_Main,"{?StyleID}",Netout.CssFilePath) NewsMainStr = NewsMainStr & Skin_Main Next Else Dim Columns,Board_Input,ClassName,TopicLen Columns = Netout.CheckNumeric(Node.getAttribute("Columns")) If Columns = 0 Then Columns = 1 TopicLen = Netout.CheckNumeric(Node.getAttribute("TopicLen")) If TopicLen = 0 Then TopicLen = 20 Board_Input = Node.selectSingleNode("Board_Input0").text For i=0 To Ubound(SQL,2) Step Columns For j = 0 To Columns - 1 If i+j>Ubound(SQL,2) Then Exit For Skin_Main = Node.selectSingleNode("Skin_Main").text ClassName = SQL(2,i+j) If Netout.strLength(ClassName)>TopicLen then ClassName = Netout.CutStr(ClassName,TopicLen)&"..." End if Skin_Main = Replace(Skin_Main,"{?ClassID}",SQL(0,i+j)) Skin_Main = Replace(Skin_Main,"{?ClassName}",ClassName) Skin_Main = Replace(Skin_Main,"{?ParentID}",SQL(1,i+j)) Skin_Main = Replace(Skin_Main,"{?target}",SQL(5,i+j)) Skin_Main = Replace(Skin_Main,"{?StyleID}",Netout.CssFilePath) NewsMainStr = NewsMainStr & Skin_Main Next NewsMainStr = NewsMainStr & Board_Input Next End If NewsMainStr = Node.selectSingleNode("Skin_Head").text & NewsMainStr & Node.selectSingleNode("Skin_Footer").text End Sub Sub NewsType_6() Dim Skin_Main Dim Rs,i,j Dim Board_Input,Columns Board_Input = Node.selectSingleNode("Board_Input0").text Columns = Netout.CheckNumeric(Node.getAttribute("Columns")) If Columns = 0 Then Columns = 1 For i=0 To Ubound(SQL,2) Step Columns For j = 0 To Columns - 1 If i+j>Ubound(SQL,2) Then Exit For Skin_Main = Node.selectSingleNode("Skin_Main").text Skin_Main = Replace(Skin_Main,"{?LinkUrl}",SQL(1,i+j)) Skin_Main = Replace(Skin_Main,"{?LogoUrl}",SQL(2,i+j)) Skin_Main = Replace(Skin_Main,"{?LinkName}",SQL(0,i+j)) Skin_Main = Replace(Skin_Main,"{?LinkInfo}",SQL(3,i+j)) Skin_Main = Replace(Skin_Main,"{?StyleID}",Netout.CssFilePath) NewsMainStr = NewsMainStr & Skin_Main Next NewsMainStr = NewsMainStr & Board_Input Next Set Rs = Nothing NewsMainStr = Node.selectSingleNode("Skin_Head").text & NewsMainStr & Node.selectSingleNode("Skin_Footer").text End Sub Sub NewsType_7() Dim Skin_Main Dim Rs,i,j Dim Board_Input,Columns Board_Input = Node.selectSingleNode("Board_Input0").text Columns = Netout.CheckNumeric(Node.getAttribute("Columns")) If Columns = 0 Then Columns = 1 For i=0 To Ubound(SQL,2) Step Columns For j = 0 To Columns - 1 If i+j>Ubound(SQL,2) Then Exit For Skin_Main = Node.selectSingleNode("Skin_Main").text Skin_Main = Replace(Skin_Main,"{?LinkUrl}",SQL(0,i+j)) Skin_Main = Replace(Skin_Main,"{?ImageFile}",Config.SystemUrl&SQL(1,i+j)) Skin_Main = Replace(Skin_Main,"{?ImageInfo}",SQL(2,i+j)) Skin_Main = Replace(Skin_Main,"{?StyleID}",Netout.CssFilePath) NewsMainStr = NewsMainStr & Skin_Main Next NewsMainStr = NewsMainStr & Board_Input Next Set Rs = Nothing NewsMainStr = Node.selectSingleNode("Skin_Head").text & NewsMainStr & Node.selectSingleNode("Skin_Footer").text End Sub Sub NewsType_8() Dim Main_Html,i If Netout.UserName = "" Then Main_Html = Node.selectSingleNode("UserLogin").text Main_Html = Replace(Main_Html,"{?CheckCode}",Netout.GetCode()) Else Dim TitleCount,ImageCount,ArticleCount TitleCount = Conn.Execute("Select Count(TitleID) from Nt_Title Where TitleUser='"&Netout.UserName&"'")(0) ImageCount = Conn.Execute("Select Sum(iCount) from Nt_Title Where TitleUser='"&Netout.UserName&"'")(0) ArticleCount = Conn.Execute("Select Count(ID) from Nt_Diary Where DiaryUser='"&Netout.UserName&"'")(0) ImageCount = Netout.CheckNumeric(ImageCount) Main_Html = Node.selectSingleNode("UserInfo").text Main_Html = Replace(Main_Html,"{?UserName}",Netout.UserName) Main_Html = Replace(Main_Html,"{?UserGroup}",Netout.GetCookie("Group")) Main_Html = Replace(Main_Html,"{?TitleCount}",TitleCount) Main_Html = Replace(Main_Html,"{?ImageCount}",ImageCount) Main_Html = Replace(Main_Html,"{?ArticleCount}",ArticleCount) arrSetting = Split(Netout.GetCookie("Setting"),",") NewSetting = arrSetting(0) For i = 1 To 6 NewSetting = NewSetting&","&arrSetting(i) Next NewSetting = NewSetting&","&arrSetting(10) Main_Html = Replace(Main_Html,"{?Purview}",NewSetting) End If Main_Html = Replace(Main_Html,"{?StyleID}",Netout.CssFilePath) NewsMainStr = NewsMainStr & Main_Html End Sub Sub NewsType_910() Dim ShowType,PicWidth,PicHeight ShowType = Netout.CheckNumeric(Node.getAttribute("ShowType")) PicWidth = Netout.CheckNumeric(Node.getAttribute("PicWidth")) PicHeight = Netout.CheckNumeric(Node.getAttribute("PicHeight")) If PicWidth = 0 Or PicHeight = 0 Then Select Case ShowType Case 1 PicWidth = Config.Settings(37) PicHeight = Config.Settings(38) Case 2 PicWidth = Config.Settings(39) PicHeight = Config.Settings(40) Case 3 PicWidth = Config.Settings(41) PicHeight = Config.Settings(42) Case 4 PicWidth = Config.Settings(35) PicHeight = Config.Settings(36) Case 5 PicWidth = 88 PicHeight = 31 End Select End If Main_Html = Netout.GetImage(ShowType,PicWidth,PicHeight) If Main_Html="" Then Main_Html = Node.getAttribute("EmptyText") NewsMainStr = NewsMainStr & Main_Html End Sub Sub NewsType_11() Dim Skin_Main Dim Rs,i,j Dim Board_Input,Columns Board_Input = Node.selectSingleNode("Board_Input0").text Columns = Netout.CheckNumeric(Node.getAttribute("Columns")) If Columns = 0 Then Columns = 1 For i=0 To Ubound(SQL,2) Step Columns For j = 0 To Columns - 1 If i+j>Ubound(SQL,2) Then Exit For Skin_Main = Node.selectSingleNode("Skin_Main").text Skin_Main = Replace(Skin_Main,"{?LinkName}",SQL(0,i+j)) Skin_Main = Replace(Skin_Main,"{?LinkUrl}",SQL(1,i+j)) Skin_Main = Replace(Skin_Main,"{?target}",SQL(2,i+j)) Skin_Main = Replace(Skin_Main,"{?StyleID}",Netout.CssFilePath) NewsMainStr = NewsMainStr & Skin_Main Next NewsMainStr = NewsMainStr & Board_Input Next Set Rs = Nothing NewsMainStr = Node.selectSingleNode("Skin_Head").text & NewsMainStr & Node.selectSingleNode("Skin_Footer").text End Sub Function Fixjs(Strings) Dim Str Str = Strings str = Replace(str, CHR(39), "\'") str = Replace(str, CHR(13), "") str = Replace(str, CHR(10), "") str = Replace(str, "]]>","]]>") Fixjs = str End Function Function CheckServer(str) Dim i,servername If str="" Then CheckServer = True Exit Function Else CheckServer = False End If str=split(Cstr(str),",") servername=Request.ServerVariables("HTTP_REFERER") For i=0 to Ubound(str) If Right(str(i),1)="/" Then str(i)=left(Trim(str(i)),Len(str(i))-1) If Lcase(left(servername,Len(str(i))))=Lcase(str(i)) then checkserver = True Exit For Else checkserver = False End if Next End Function %>